Performance counters provide statistical information about application behavior. The information exposed through performance counters may be used by operations useful for, by way of non-limiting example: (i) debugging and troubleshooting performance and resource usage problems; (ii) tuning application configuration to achieve optimum performance; (iii) providing capacity management to properly scale applications according to business needs; and (iv) providing application health monitoring and service level monitoring.
Performance counters are essential for detecting and troubleshooting application issues related to high application load. The typical problems that are addressed by performance counters are slow performance and high consumption of shared resources such as CPU, network, memory, and file systems. In addition to those problems, performance counters can be used for warning about high usage of internal application resources. For example, for an application that uses an internal queue for storing requests, the application may provide a performance counter that will show percent of queue used. When usage goes above a predefined threshold, a warning to an administrator may be issued. Administrators may use performance counters to pinpoint a source of performance or resource usage problems. After resolution of a problem, administrators use performance counters to verify the resolution and ensure that the application has a healthy behavior.
In addition to using performance counters to troubleshoot problems, administrators can use performance counters in a proactive mode to analyze application runtime parameters and to fine tune the application configuration, environment configuration and hardware to achieve optimal performance.
Still further, performance counters may be used for capacity planning. To do a proper capacity planning, administrators need to be able to map business requirements for application performance and scalability into infrastructure requirements for memory, CPU power, network and so on. Performance counters allow quantifying user load placed on an application and the corresponding load placed on infrastructure resources. Typically, an application may need to provide a set of counters to measure the current load, such as number of users, number of transactions and so on. Performance counters for measuring load on resources are typically provided by an operating system or, in case of non-standard resources, by vendor applications.
Application health and service level monitoring is yet another area that may rely on information provided by performance counters. While information, warning, and error events report about important occurrences inside a monitored application, performance counters reflect the current state of an application in a quantifiable form. The first step for using performance counters for health monitoring is to define the “normal” behavior of an application and values for performance counters that correspond to the “normal” behavior. After that, critical deviations from normal behavior need to be identified. Most monitoring tools allow generating warning or error messages when the value of a performance counter crosses a threshold. An example of that can be monitoring for the amount of available memory and generating a warning when the application reaches a low level memory condition.
While performance counters are critical for application manageability and supportability, software development teams typically do not spend an appropriate amount of time on adding performance counters to their applications. Traditionally, application manageability requirements are considered optional and are treated with lower priority compared to functional or performance requirements. As a result, the majority of applications in production do not expose performance counters at all or expose an insufficient set of performance counters.
It would therefore be advantageous to provide a system and method by which performance counters could be added to an application after the application code has been authored, and without requiring changes to the finalized development code, thus adding an application management function to an application that would otherwise have none.